package org.JWCB.system.domain.exam.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDateTime;

@Getter
@Setter
@ToString
public class ExamAddDto {

    @NotNull(message = "标题不为空")
    @Size(min = 1,max = 50,message = "标题长度大于0且小于50")
    private String title;


    @NotNull(message = "开始时间不为空")
    @Future(message = "开始时间不能是过去时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;


    @NotNull(message = "结束时间不为空")
    @Future(message = "结束时间不能是过去时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
}
